package com.itmeima.d5_block;

public class Student {
    static int number =80;
    static String name ="张三";

    //静态代码块
    static{
        System.out.println("静态代码块执行了");
        name ="李四";
    }
    //int age ;
    //实例代码块
    {
        System.out.println("实例代码块执行了");
       // age =18;
        System.out.println("有人创建了对象"+this);
    }

    public Student(){
        System.out.println("无参构造方法执行了");
    }

    public Student(String name){
        System.out.println("有参构造方法执行了");
    }
}
